package web.util;

import java.io.UnsupportedEncodingException;
/**用于转码
 * @author 樂淵
 * @version 1.0
 * */
public class CharSet {
	/**ISO-8859-1转为UTF-8
	 * @param s 待转字符串
	 * @return s 已转字符串
	 * */
	public static String parseStringToUTF(String s){
		if(s != null && !"".equals(s))
			try {
				s = new String(s.getBytes("iso-8859-1"),"UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
		else
			s = null;
		return s;
	}
}
